<?php
defined('SYSPATH') OR die('No direct access allowed.');
/**
 * MAPI COA Project
 * index.php
 * @author ranuandra
 *
 * 22 Jul 2011
 * tags
 */
?>
<div>
	<table class="tbltitle" align="center">
	<thead>
		<tr>
			<td class="title">
				Data Product Specification
			</td>
			<td class="toolbar">		
					<a href="<?php echo URL::base()?>productspec/new">+ New</a> 
			</td>
		</tr>
	</thead>
	</table>
	<table class="data" align="center">
	<thead>
		<tr>
			<th>Prod Name</th>
			<th>Cust Name</th>
			<th>Cu</th>
			<th>Si</th>
			<th>Fe</th>
			<th>Zn</th>
			<th>Mn</th>
			<th>Mg</th>
			<th>Ni</th>
			<th>Ti</th>
			<th>Pb</th>
			<th>Sn</th>
			<th>Cr</th>
			<th>Ca</th>
			<th>Bi</th>
			<th>Hg</th>
			<th>Cd</th>
			<th>Al</th>
			<th>H2Gas</th>
			<th>Sludge</th>
			<th>Value</th>
			<th>COA</th>
			<th></th>
			<th></th>
			
		</tr>
	</thead>
<?php 
if(isset($datas))
{
	$rowclass = 0;
	foreach($datas as $data)
	{
?>
		<tr class="row<?php echo $rowclass?>">
			<td><?php echo $data->product->product_name ?></td>
			<td><?php echo $data->customer->name ?></td>
			<td><?php echo $data->cu ?></td>
			<td><?php echo $data->si ?></td>
			<td><?php echo $data->fe ?></td>
			<td><?php echo $data->zn ?></td>
			<td><?php echo $data->mn ?></td>
			<td><?php echo $data->mg ?></td>
			<td><?php echo $data->ni ?></td>
			<td><?php echo $data->ti ?></td>
			<td><?php echo $data->pb ?></td>
			<td><?php echo $data->sn ?></td>
			<td><?php echo $data->cr ?></td>
			<td><?php echo $data->ca ?></td>
			<td><?php echo $data->bi ?></td>
			<td><?php echo $data->hg ?></td>
			<td><?php echo $data->cd ?></td>
			<td><?php echo $data->al ?></td>
			<td><?php echo $data->h2gas ?></td>
			<td><?php echo $data->sludge ?></td>
		
			<td><?php echo $data->kvalues ?></td>
			<td><a href="<?php echo URL::base()?>coa/data/<?php echo $data->id ?>">Add Data</a></td>
			<td><a href="<?php echo URL::base()?>coa/pdf/<?php echo $data->id ?>">pdf</a></td>
		</tr>
<?php 
		$rowclass = 1 - $rowclass;	
	}
}
?>
	</table>
</div>